<template>
  <section>
    <el-table :data="cly_table" style="width: 100%" @selection-change="selectionChange">
      <el-table-column v-if="select" type="selection" width="55"> </el-table-column>
      <el-table-column prop="name" label="名字"> </el-table-column>
    </el-table>
  </section>
</template>

<script>
import { quer_status_user } from '../../api/user/index.js'
export default {
  props: {
    //   是否可以选中
    select: false,
    //   选中项发生改变
    select_change: {
      type: Function,
      default(val) {},
    },
  },
  data() {
    return {
      cly_table: [],
      select_table: [],
    }
  },
  methods: {
    // 获取测量员
    async get_cly() {
      let res = await quer_status_user({
        role: 6,
      })
      if (res.result == 0) {
        this.cly_table = res.resultContent.userList
      }
      console.log(res)
    },
    selectionChange(val) {
      this.select_change(val)
      this.select_table = val
    },
  },
  mounted() {
    this.get_cly()
  },
}
</script>

<style>
</style>